home *** CD-ROM | disk | FTP | other *** search
/ Aminet 45 / Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso / Aminet / game / role / ldmud-3.2-bin.lha / mud / doc / efun / count_bits < prev    next >
Text File  |  2001-04-06  |  400b  |  18 lines

  1. SYNOPSIS
  2.         int count_bits (string str)
  3.  
  4. DESTRIPTION
  5.         Count the number of set bits in bitstring <str> and return the number
  6.         as result.
  7.  
  8. EXAMPLES
  9.         string s;
  10.  
  11.         s = set_bit("", 3); s = set_bit(s, 15);
  12.  
  13.         count_bits(s) --> returns 2
  14.  
  15. SEE ALSO
  16.         clear_bit(E), set_bit(E), test_bit(E), next_bit(E), last_bit(E),
  17.         or_bits(E), xor_bits(E), invert_bits(E)
  18.